package com.campus.mapper;

import com.campus.entity.HotRankings;
import com.campus.entity.PostDetailDTO;
import com.campus.entity.Posts;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HotRankingsMapper {
    HotRankings getHotRankingsByPostId(String postId);

    int insertHotRankingsByLikeCount(HotRankings hotRankings);

    int updateHotRankingsLikeCountByPostId(@Param("hotRankings") HotRankings hotRankings, @Param("postId") String postId);
    int insertHotRankingsByViewCount(HotRankings hotRankings);

    int updateHotRankingsViewCountByPostId(@Param("hotRankings") HotRankings hotRankings, @Param("postId") String postId);
    List<PostDetailDTO> getHotPostsByDate(@Param("lim") int lim, @Param("date") String date);
    
    List<PostDetailDTO> getCategoryHotPostsByDate(@Param("categoryId") String categoryId, @Param("lim") int lim, @Param("date") String date);
}